package com.three.mapper;

import com.three.entity.Menu;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author 天天好心情
* @description 针对表【menu】的数据库操作Mapper
* @createDate 2024-10-22 14:53:02
* @Entity com.three.entity.Menu
*/
public interface MenuMapper {

    int deleteByPrimaryKey(Long id);

    int insert(Menu record);

    int insertSelective(Menu record);

    Menu selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Menu record);

    int updateByPrimaryKey(Menu record);

    //根据登陆者（staff）的id获取对应的菜单
    List<Menu> getMenuByStaffId(Integer staffid);

    List<Menu> selectAll();

    List<Integer> selectByRoleId(Integer roleid);

    int  deleteByRoleId(Integer roleid);

    int insertRoleMenu(@Param("roleid") Integer roleid,@Param("key") Integer key);
}
